package com.catclay.adultmoon.dao;

import com.catclay.adultmoon.pojo.Shop;
import com.catclay.adultmoon.pojo.ShopPlatform;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.HashMap;

@Repository
public class ShopDao {

    private static HashMap<Integer, Shop> shops = null;


    //平台
    @Autowired
    private ShopPlatformDao shopPlatformDao;

    static {
        shops = new HashMap<Integer, Shop>();
        shops.put(1,new Shop(1,"am",new ShopPlatform(1,"jd")));
        shops.put(2,new Shop(2,"bm",new ShopPlatform(2,"tb")));
        shops.put(3,new Shop(3,"cm",new ShopPlatform(3,"pdd")));
        shops.put(3,new Shop(4,"dm",new ShopPlatform(3,"pdd")));
    }



    public Collection<Shop> getAllShop(){
        return shops.values();
    }

    public Shop getShopById(Integer id){
        return shops.get(id);
    }
}
